{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"name":"NLU_training_multi_lingual_multi_class_text_classifier_demo.ipynb","provenance":[],"collapsed_sections":[]},"kernelspec":{"name":"python3","display_name":"Python 3"}},"cells":[{"cell_type":"markdown","metadata":{"id":"zkufh760uvF3"},"source":["![JohnSnowLabs](https://nlp.johnsnowlabs.com/assets/images/logo.png)\n","\n","[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/JohnSnowLabs/nlu/blob/master/examples/colab/Training/multi_lingual/multi_class_text_classification/NLU_training_multi_lingual_multi_class_text_classifier_demo.ipynb)\n","\n","\n","\n","\n","# Training a Deep Learning Classifier with NLU \n","## ClassifierDL (Multi-class Text Classification)\n","With the [ClassifierDL model](https://nlp.johnsnowlabs.com/docs/en/annotators#classifierdl-multi-class-text-classification) from Spark NLP you can achieve State Of the Art results on any multi class text classification problem \n","\n","This notebook showcases the following features : \n","\n","- How to train the deep learning classifier\n","- How to store a pipeline to disk\n","- How to load the pipeline from disk (Enables NLU offline mode)\n","\n","You can achieve these results or even better on this dataset with training data :\n","\n","![image.png]()\n","\n","<br>\n","\n","\n","You can achieve these results or even better on this dataset with test data :\n","\n","<br>\n","\n","![image.png]()"]},{"cell_type":"markdown","metadata":{"id":"dur2drhW5Rvi"},"source":["# 1. Install Java 8 and NLU"]},{"cell_type":"code","metadata":{"id":"hFGnBCHavltY","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1620195847576,"user_tz":-300,"elapsed":127308,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"ed595633-2079-469a-f097-9ca9183fc24b"},"source":["!wget https://setup.johnsnowlabs.com/nlu/colab.sh -O - | bash\n","  \n","\n","import nlu"],"execution_count":null,"outputs":[{"output_type":"stream","text":["--2021-05-05 06:22:01--  https://raw.githubusercontent.com/JohnSnowLabs/nlu/master/scripts/colab_setup.sh\n","Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...\n","Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected.\n","HTTP request sent, awaiting response... 200 OK\n","Length: 1671 (1.6K) [text/plain]\n","Saving to: ‘STDOUT’\n","\n","\r-                     0%[                    ]       0  --.-KB/s               Installing  NLU 3.0.0 with  PySpark 3.0.2 and Spark NLP 3.0.1 for Google Colab ...\n","\r-                   100%[===================>]   1.63K  --.-KB/s    in 0.001s  \n","\n","2021-05-05 06:22:02 (1.63 MB/s) - written to stdout [1671/1671]\n","\n","\u001b[K     |████████████████████████████████| 204.8MB 68kB/s \n","\u001b[K     |████████████████████████████████| 153kB 49.5MB/s \n","\u001b[K     |████████████████████████████████| 204kB 15.4MB/s \n","\u001b[K     |████████████████████████████████| 204kB 54.7MB/s \n","\u001b[?25h  Building wheel for pyspark (setup.py) ... \u001b[?25l\u001b[?25hdone\n"],"name":"stdout"}]},{"cell_type":"markdown","metadata":{"id":"f4KkTfnR5Ugg"},"source":["# 2. Download news classification dataset"]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"OrVb5ZMvvrQD","executionInfo":{"status":"ok","timestamp":1620195849627,"user_tz":-300,"elapsed":129273,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"2b74892b-d5da-4393-e5e9-276107260486"},"source":["! wget http://ckl-it.de/wp-content/uploads/2021/02/news_category_test_multi_lingual.csv"],"execution_count":null,"outputs":[{"output_type":"stream","text":["--2021-05-05 06:24:07--  http://ckl-it.de/wp-content/uploads/2021/02/news_category_test_multi_lingual.csv\n","Resolving ckl-it.de (ckl-it.de)... 217.160.0.108, 2001:8d8:100f:f000::209\n","Connecting to ckl-it.de (ckl-it.de)|217.160.0.108|:80... connected.\n","HTTP request sent, awaiting response... 200 OK\n","Length: 1592801 (1.5M) [text/csv]\n","Saving to: ‘news_category_test_multi_lingual.csv’\n","\n","news_category_test_ 100%[===================>]   1.52M  1.45MB/s    in 1.0s    \n","\n","2021-05-05 06:24:08 (1.45 MB/s) - ‘news_category_test_multi_lingual.csv’ saved [1592801/1592801]\n","\n"],"name":"stdout"}]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/","height":419},"id":"y4xSRWIhwT28","executionInfo":{"status":"ok","timestamp":1620195850528,"user_tz":-300,"elapsed":130140,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"80ace5e3-deb4-4da1-dd2a-34a4ff9b7c98"},"source":["import pandas as pd\n","test_path = '/content/news_category_test_multi_lingual.csv'\n","train_df = pd.read_csv(test_path)\n","from sklearn.model_selection import train_test_split\n","train_df, test_df = train_test_split(train_df, test_size=0.2)\n","train_df"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>Unnamed: 0</th>\n","      <th>y</th>\n","      <th>text</th>\n","      <th>test_sentences</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>6171</th>\n","      <td>6171</td>\n","      <td>Sports</td>\n","      <td>LeBron James scored 25 points, Jeff McInnis a...</td>\n","      <td></td>\n","    </tr>\n","    <tr>\n","      <th>4540</th>\n","      <td>4540</td>\n","      <td>Sports</td>\n","      <td>year old Miss Peru has been crowned Miss World...</td>\n","      <td></td>\n","    </tr>\n","    <tr>\n","      <th>1776</th>\n","      <td>1776</td>\n","      <td>Sports</td>\n","      <td>The message board in Canada #39;s dressing roo...</td>\n","      <td></td>\n","    </tr>\n","    <tr>\n","      <th>7173</th>\n","      <td>7173</td>\n","      <td>Business</td>\n","      <td>Mumbai: Singapore Technologies Telemedia and T...</td>\n","      <td></td>\n","    </tr>\n","    <tr>\n","      <th>6939</th>\n","      <td>6939</td>\n","      <td>Sports</td>\n","      <td>Syracuse coach Jim Boeheim, while watching tap...</td>\n","      <td></td>\n","    </tr>\n","    <tr>\n","      <th>...</th>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","    </tr>\n","    <tr>\n","      <th>2870</th>\n","      <td>2870</td>\n","      <td>Sports</td>\n","      <td>CLEVELAND Indians righthander Kyle Denney was ...</td>\n","      <td></td>\n","    </tr>\n","    <tr>\n","      <th>5610</th>\n","      <td>5610</td>\n","      <td>World</td>\n","      <td>An Italian prosecutor asked a court on  Frida...</td>\n","      <td></td>\n","    </tr>\n","    <tr>\n","      <th>6838</th>\n","      <td>6838</td>\n","      <td>Sci/Tech</td>\n","      <td>One of the hottest holiday gifts this year is ...</td>\n","      <td></td>\n","    </tr>\n","    <tr>\n","      <th>2226</th>\n","      <td>2226</td>\n","      <td>World</td>\n","      <td>President Bush went before a skeptical hall of...</td>\n","      <td></td>\n","    </tr>\n","    <tr>\n","      <th>2559</th>\n","      <td>2559</td>\n","      <td>World</td>\n","      <td>Pakistan says it has dealt a major blow to al-...</td>\n","      <td></td>\n","    </tr>\n","  </tbody>\n","</table>\n","<p>6080 rows × 4 columns</p>\n","</div>"],"text/plain":["      Unnamed: 0  ... test_sentences\n","6171        6171  ...               \n","4540        4540  ...               \n","1776        1776  ...               \n","7173        7173  ...               \n","6939        6939  ...               \n","...          ...  ...            ...\n","2870        2870  ...               \n","5610        5610  ...               \n","6838        6838  ...               \n","2226        2226  ...               \n","2559        2559  ...               \n","\n","[6080 rows x 4 columns]"]},"metadata":{"tags":[]},"execution_count":3}]},{"cell_type":"markdown","metadata":{"id":"0296Om2C5anY"},"source":["# 3. Train Deep Learning Classifier using nlu.load('train.classifier')\n","\n","By default, the Universal Sentence Encoder Embeddings (USE) are beeing downloaded to provide embeddings for the classifier. You can use any of the 50+ other sentence Emeddings in NLU tough!\n","\n","You dataset label column should be named 'y' and the feature column with text data should be named 'text'"]},{"cell_type":"code","metadata":{"id":"3ZIPkRkWftBG","colab":{"base_uri":"https://localhost:8080/","height":1000},"executionInfo":{"status":"ok","timestamp":1620197164105,"user_tz":-300,"elapsed":1443608,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"c4004705-d784-4d1e-d608-ab87e99ec308"},"source":["trainable_pipe = nlu.load('xx.embed_sentence.labse train.classifier')\n","# We need to train longer and user smaller LR for NON-USE based sentence embeddings usually\n","# We could tune the hyperparameters further with hyperparameter tuning methods like gridsearch\n","# Also longer training gives more accuracy\n","trainable_pipe['trainable_classifier_dl'].setMaxEpochs(60)  \n","trainable_pipe['trainable_classifier_dl'].setLr(0.005) \n","fitted_pipe = trainable_pipe.fit(train_df.iloc[:1500])\n","# predict with the trainable pipeline on dataset and get predictions\n","preds = fitted_pipe.predict(train_df.iloc[:1500],output_level='document')\n","\n","#sentence detector that is part of the pipe generates sone NaNs. lets drop them first\n","preds.dropna(inplace=True)\n","from sklearn.metrics import classification_report\n","print(classification_report(preds['y'], preds['classifier_dl']))\n","\n","preds"],"execution_count":null,"outputs":[{"output_type":"stream","text":["labse download started this may take some time.\n","Approximate size to download 1.7 GB\n","[OK!]\n","sentence_detector_dl download started this may take some time.\n","Approximate size to download 354.6 KB\n","[OK!]\n","              precision    recall  f1-score   support\n","\n","    Business       0.87      0.90      0.89       384\n","    Sci/Tech       0.90      0.91      0.90       351\n","      Sports       0.95      0.97      0.96       376\n","       World       0.96      0.90      0.93       389\n","\n","    accuracy                           0.92      1500\n","   macro avg       0.92      0.92      0.92      1500\n","weighted avg       0.92      0.92      0.92      1500\n","\n"],"name":"stdout"},{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>y</th>\n","      <th>trained_classifier</th>\n","      <th>test_sentences</th>\n","      <th>text</th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>Unnamed: 0</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>Sports</td>\n","      <td>Sports</td>\n","      <td></td>\n","      <td>LeBron James scored 25 points, Jeff McInnis a...</td>\n","      <td>[LeBron James scored 25 points, Jeff McInnis a...</td>\n","      <td>6171</td>\n","      <td>LeBron James scored 25 points, Jeff McInnis ad...</td>\n","      <td>[-0.028670351952314377, 0.002140851691365242, ...</td>\n","      <td>6171</td>\n","      <td>1.000000</td>\n","    </tr>\n","    <tr>\n","      <th>1</th>\n","      <td>Sports</td>\n","      <td>Sports</td>\n","      <td></td>\n","      <td>year old Miss Peru has been crowned Miss World...</td>\n","      <td>[year old Miss Peru has been crowned Miss Worl...</td>\n","      <td>4540</td>\n","      <td>year old Miss Peru has been crowned Miss World...</td>\n","      <td>[0.024964714422822, -0.005680068861693144, 0.0...</td>\n","      <td>4540</td>\n","      <td>0.994070</td>\n","    </tr>\n","    <tr>\n","      <th>2</th>\n","      <td>Sports</td>\n","      <td>Sports</td>\n","      <td></td>\n","      <td>The message board in Canada #39;s dressing roo...</td>\n","      <td>[The message board in Canada #39;s dressing ro...</td>\n","      <td>1776</td>\n","      <td>The message board in Canada #39;s dressing roo...</td>\n","      <td>[0.036584075540304184, 0.04450026899576187, -0...</td>\n","      <td>1776</td>\n","      <td>1.000000</td>\n","    </tr>\n","    <tr>\n","      <th>3</th>\n","      <td>Business</td>\n","      <td>Business</td>\n","      <td></td>\n","      <td>Mumbai: Singapore Technologies Telemedia and T...</td>\n","      <td>[Mumbai: Singapore Technologies Telemedia and ...</td>\n","      <td>7173</td>\n","      <td>Mumbai: Singapore Technologies Telemedia and T...</td>\n","      <td>[-0.04297986626625061, -0.0017465378623455763,...</td>\n","      <td>7173</td>\n","      <td>0.986490</td>\n","    </tr>\n","    <tr>\n","      <th>4</th>\n","      <td>Sports</td>\n","      <td>Sports</td>\n","      <td></td>\n","      <td>Syracuse coach Jim Boeheim, while watching tap...</td>\n","      <td>[Syracuse coach Jim Boeheim, while watching ta...</td>\n","      <td>6939</td>\n","      <td>Syracuse coach Jim Boeheim, while watching tap...</td>\n","      <td>[-0.020442135632038116, 0.004873048048466444, ...</td>\n","      <td>6939</td>\n","      <td>1.000000</td>\n","    </tr>\n","    <tr>\n","      <th>...</th>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","    </tr>\n","    <tr>\n","      <th>1495</th>\n","      <td>Sci/Tech</td>\n","      <td>Business</td>\n","      <td></td>\n","      <td>definition TV yet. Competition may force the p...</td>\n","      <td>[definition TV yet., Competition may force the...</td>\n","      <td>6539</td>\n","      <td>definition TV yet. Competition may force the p...</td>\n","      <td>[-0.019764604046940804, 0.004894972778856754, ...</td>\n","      <td>6539</td>\n","      <td>0.994347</td>\n","    </tr>\n","    <tr>\n","      <th>1496</th>\n","      <td>Sci/Tech</td>\n","      <td>Sci/Tech</td>\n","      <td></td>\n","      <td>Webshots users offer their photos of Bill Gate...</td>\n","      <td>[Webshots users offer their photos of Bill Gat...</td>\n","      <td>4257</td>\n","      <td>Webshots users offer their photos of Bill Gate...</td>\n","      <td>[0.029549693688750267, 0.0014347410760819912, ...</td>\n","      <td>4257</td>\n","      <td>0.998830</td>\n","    </tr>\n","    <tr>\n","      <th>1497</th>\n","      <td>Sci/Tech</td>\n","      <td>Sci/Tech</td>\n","      <td></td>\n","      <td>The two companies say they will jointly develo...</td>\n","      <td>[The two companies say they will jointly devel...</td>\n","      <td>2910</td>\n","      <td>The two companies say they will jointly develo...</td>\n","      <td>[-0.035613108426332474, -0.029767965897917747,...</td>\n","      <td>2910</td>\n","      <td>1.000000</td>\n","    </tr>\n","    <tr>\n","      <th>1498</th>\n","      <td>World</td>\n","      <td>World</td>\n","      <td></td>\n","      <td>Peruvian authorities on Monday  launched an o...</td>\n","      <td>[Peruvian authorities on Monday launched an of...</td>\n","      <td>6626</td>\n","      <td>Peruvian authorities on Monday launched an off...</td>\n","      <td>[0.030554521828889847, 0.014035936444997787, 0...</td>\n","      <td>6626</td>\n","      <td>1.000000</td>\n","    </tr>\n","    <tr>\n","      <th>1499</th>\n","      <td>World</td>\n","      <td>World</td>\n","      <td></td>\n","      <td>Britain's Tony Blair flew to Khartoum on Wedn...</td>\n","      <td>[Britain's Tony Blair flew to Khartoum on Wedn...</td>\n","      <td>3233</td>\n","      <td>Britain's Tony Blair flew to Khartoum on Wedne...</td>\n","      <td>[0.011163398623466492, -0.03577205538749695, 0...</td>\n","      <td>3233</td>\n","      <td>1.000000</td>\n","    </tr>\n","  </tbody>\n","</table>\n","<p>1500 rows × 10 columns</p>\n","</div>"],"text/plain":["             y  ... trained_classifier_confidence_confidence\n","0       Sports  ...                                 1.000000\n","1       Sports  ...                                 0.994070\n","2       Sports  ...                                 1.000000\n","3     Business  ...                                 0.986490\n","4       Sports  ...                                 1.000000\n","...        ...  ...                                      ...\n","1495  Sci/Tech  ...                                 0.994347\n","1496  Sci/Tech  ...                                 0.998830\n","1497  Sci/Tech  ...                                 1.000000\n","1498     World  ...                                 1.000000\n","1499     World  ...                                 1.000000\n","\n","[1500 rows x 10 columns]"]},"metadata":{"tags":[]},"execution_count":4}]},{"cell_type":"markdown","metadata":{"id":"_1jxw3GnVGlI"},"source":["# 3.1 evaluate on Test Data"]},{"cell_type":"code","metadata":{"id":"Fxx4yNkNVGFl","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1620197483940,"user_tz":-300,"elapsed":1763436,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"60b586d0-51db-434a-a84f-195443d6a9a5"},"source":["preds = fitted_pipe.predict(test_df,output_level='document')\n","\n","#sentence detector that is part of the pipe generates sone NaNs. lets drop them first\n","preds.dropna(inplace=True)\n","print(classification_report(preds['y'], preds['classifier_dl']))"],"execution_count":null,"outputs":[{"output_type":"stream","text":["              precision    recall  f1-score   support\n","\n","    Business       0.80      0.79      0.80       381\n","    Sci/Tech       0.80      0.83      0.81       384\n","      Sports       0.89      0.95      0.92       375\n","       World       0.89      0.81      0.85       380\n","\n","    accuracy                           0.84      1520\n","   macro avg       0.85      0.85      0.84      1520\n","weighted avg       0.85      0.84      0.84      1520\n","\n"],"name":"stdout"}]},{"cell_type":"markdown","metadata":{"id":"BD5OKO4Umc5U"},"source":["# 4. Test Model  with  20 languages!"]},{"cell_type":"code","metadata":{"id":"OQ72hP9unML7","colab":{"base_uri":"https://localhost:8080/","height":776},"executionInfo":{"status":"ok","timestamp":1620197513218,"user_tz":-300,"elapsed":1792703,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"2f12e36a-dd91-4a01-d85c-bee5004193dc"},"source":["train_df = pd.read_csv(\"news_category_test_multi_lingual.csv\")\n","preds = fitted_pipe.predict(train_df[[\"test_sentences\",\"y\"]].iloc[:100],output_level='document')\n","\n","#sentence detector that is part of the pipe generates sone NaNs. lets drop them first\n","preds.dropna(inplace=True)\n","print(classification_report(preds['y'], preds['classifier_dl']))\n","\n","preds"],"execution_count":null,"outputs":[{"output_type":"stream","text":["              precision    recall  f1-score   support\n","\n","    Business       0.62      0.83      0.71        12\n","    Sci/Tech       0.91      0.78      0.84        37\n","      Sports       0.71      0.95      0.82        21\n","       World       0.88      0.70      0.78        30\n","\n","    accuracy                           0.80       100\n","   macro avg       0.78      0.82      0.79       100\n","weighted avg       0.82      0.80      0.80       100\n","\n"],"name":"stdout"},{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>y</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>text</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[టర్నర్ నెవాల్ వద్ద కార్మికులకు ప్రాతినిధ్యం వ...</td>\n","      <td>0</td>\n","      <td>Business</td>\n","      <td>టర్నర్ నెవాల్ వద్ద కార్మికులకు ప్రాతినిధ్యం వహ...</td>\n","      <td>[-0.05777166411280632, -0.011031205765902996, ...</td>\n","      <td>Business</td>\n","      <td>టర్నర్ నెవాల్ వద్ద కార్మికులకు ప్రాతినిధ్యం వహ...</td>\n","      <td>0.995227</td>\n","    </tr>\n","    <tr>\n","      <th>1</th>\n","      <td>[Торонто, Канада # 36; 10 миллион Ансари X пре...</td>\n","      <td>1</td>\n","      <td>Sci/Tech</td>\n","      <td>Торонто, Канада # 36; 10 миллион Ансари X прем...</td>\n","      <td>[-0.03927089646458626, -0.059984903782606125, ...</td>\n","      <td>Sports</td>\n","      <td>Торонто, Канада # 36; 10 миллион Ансари X прем...</td>\n","      <td>0.965024</td>\n","    </tr>\n","    <tr>\n","      <th>2</th>\n","      <td>[Une société fondée par un chercheur en chimie...</td>\n","      <td>2</td>\n","      <td>Sci/Tech</td>\n","      <td>Une société fondée par un chercheur en chimie ...</td>\n","      <td>[-0.04712514951825142, -0.025509435683488846, ...</td>\n","      <td>Sci/Tech</td>\n","      <td>Une société fondée par un chercheur en chimie ...</td>\n","      <td>0.999993</td>\n","    </tr>\n","    <tr>\n","      <th>3</th>\n","      <td>[সবেমাত্র ভোর যখন মাইক ফিৎসপ্যাট্রিক রঙিন মানচ...</td>\n","      <td>3</td>\n","      <td>Sci/Tech</td>\n","      <td>সবেমাত্র ভোর যখন মাইক ফিৎসপ্যাট্রিক রঙিন মানচি...</td>\n","      <td>[-0.046090301126241684, -0.05127095431089401, ...</td>\n","      <td>Sci/Tech</td>\n","      <td>সবেমাত্র ভোর যখন মাইক ফিৎসপ্যাট্রিক রঙিন মানচি...</td>\n","      <td>0.999484</td>\n","    </tr>\n","    <tr>\n","      <th>4</th>\n","      <td>[Көньяк Калифорниянең томанга каршы көрәш аген...</td>\n","      <td>4</td>\n","      <td>Sci/Tech</td>\n","      <td>Көньяк Калифорниянең томанга каршы көрәш агент...</td>\n","      <td>[-0.02939724549651146, -0.04042039066553116, -...</td>\n","      <td>Sci/Tech</td>\n","      <td>Көньяк Калифорниянең томанга каршы көрәш агент...</td>\n","      <td>0.682823</td>\n","    </tr>\n","    <tr>\n","      <th>...</th>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","      <td>...</td>\n","    </tr>\n","    <tr>\n","      <th>95</th>\n","      <td>[ఫుట్‌బాల్ అసోసియేషన్ ప్రతిష్టను దెబ్బతీసిన కు...</td>\n","      <td>95</td>\n","      <td>Sports</td>\n","      <td>ఫుట్‌బాల్ అసోసియేషన్ ప్రతిష్టను దెబ్బతీసిన కుం...</td>\n","      <td>[0.025159751996397972, -0.026320766657590866, ...</td>\n","      <td>Sports</td>\n","      <td>ఫుట్‌బాల్ అసోసియేషన్ ప్రతిష్టను దెబ్బతీసిన కుం...</td>\n","      <td>1.000000</td>\n","    </tr>\n","    <tr>\n","      <th>96</th>\n","      <td>[Hücumçu Emile Heskey, Çərşənbə # 39-un Çərşən...</td>\n","      <td>96</td>\n","      <td>Sports</td>\n","      <td>Hücumçu Emile Heskey, Çərşənbə # 39-un Çərşənb...</td>\n","      <td>[0.04458563029766083, 0.03187406063079834, -0....</td>\n","      <td>Sports</td>\n","      <td>Hücumçu Emile Heskey, Çərşənbə # 39-un Çərşənb...</td>\n","      <td>1.000000</td>\n","    </tr>\n","    <tr>\n","      <th>97</th>\n","      <td>[Staples Inc. &amp; lt; A HREF = \"http://www., inv...</td>\n","      <td>97</td>\n","      <td>Business</td>\n","      <td>Staples Inc. &amp; lt; A HREF = \"http://www.invest...</td>\n","      <td>[-0.016342531889677048, -0.004877157974988222,...</td>\n","      <td>Business</td>\n","      <td>Staples Inc. &amp; lt; A HREF = \"http://www.invest...</td>\n","      <td>1.000000</td>\n","    </tr>\n","    <tr>\n","      <th>98</th>\n","      <td>[គណៈប្រតិភូនៃប្រទេសអ៊ីរ៉ាក់ត្រូវបានពន្យារពេលដោ...</td>\n","      <td>98</td>\n","      <td>World</td>\n","      <td>គណៈប្រតិភូនៃប្រទេសអ៊ីរ៉ាក់ត្រូវបានពន្យារពេលដោយ...</td>\n","      <td>[0.030007336288690567, -0.002715253969654441, ...</td>\n","      <td>World</td>\n","      <td>គណៈប្រតិភូនៃប្រទេសអ៊ីរ៉ាក់ត្រូវបានពន្យារពេលដោយ...</td>\n","      <td>0.999755</td>\n","    </tr>\n","    <tr>\n","      <th>99</th>\n","      <td>[امریکی صارفین کی قیمتوں میں جولائی میں پہلی ب...</td>\n","      <td>99</td>\n","      <td>Business</td>\n","      <td>امریکی صارفین کی قیمتوں میں جولائی میں پہلی با...</td>\n","      <td>[-0.04715615138411522, -0.04999866336584091, -...</td>\n","      <td>Business</td>\n","      <td>امریکی صارفین کی قیمتوں میں جولائی میں پہلی با...</td>\n","      <td>0.999998</td>\n","    </tr>\n","  </tbody>\n","</table>\n","<p>100 rows × 8 columns</p>\n","</div>"],"text/plain":["                                             sentence  ...  trained_classifier_confidence_confidence\n","0   [టర్నర్ నెవాల్ వద్ద కార్మికులకు ప్రాతినిధ్యం వ...  ...                                  0.995227\n","1   [Торонто, Канада # 36; 10 миллион Ансари X пре...  ...                                  0.965024\n","2   [Une société fondée par un chercheur en chimie...  ...                                  0.999993\n","3   [সবেমাত্র ভোর যখন মাইক ফিৎসপ্যাট্রিক রঙিন মানচ...  ...                                  0.999484\n","4   [Көньяк Калифорниянең томанга каршы көрәш аген...  ...                                  0.682823\n","..                                                ...  ...                                       ...\n","95  [ఫుట్‌బాల్ అసోసియేషన్ ప్రతిష్టను దెబ్బతీసిన కు...  ...                                  1.000000\n","96  [Hücumçu Emile Heskey, Çərşənbə # 39-un Çərşən...  ...                                  1.000000\n","97  [Staples Inc. & lt; A HREF = \"http://www., inv...  ...                                  1.000000\n","98  [គណៈប្រតិភូនៃប្រទេសអ៊ីរ៉ាក់ត្រូវបានពន្យារពេលដោ...  ...                                  0.999755\n","99  [امریکی صارفین کی قیمتوں میں جولائی میں پہلی ب...  ...                                  0.999998\n","\n","[100 rows x 8 columns]"]},"metadata":{"tags":[]},"execution_count":6}]},{"cell_type":"markdown","metadata":{"id":"RjtuNUcvuJTT"},"source":["# The Model understands Englsih\n","![en](https://www.worldometers.info/img/flags/small/tn_nz-flag.gif)"]},{"cell_type":"code","metadata":{"id":"o0vu7PaWkcI7","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197514386,"user_tz":-300,"elapsed":1793858,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"71269801-f7f5-475e-84c7-09cd471c6b18"},"source":["fitted_pipe.predict(\"There have been a great increase in businesses over the last decade \")\n"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[There have been a great increase in businesse...</td>\n","      <td>0</td>\n","      <td>There have been a great increase in businesses...</td>\n","      <td>[0.012169234454631805, -0.002660348080098629, ...</td>\n","      <td>Business</td>\n","      <td>0.999809</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                            sentence  ...  trained_classifier_confidence_confidence\n","0  [There have been a great increase in businesse...  ...                                  0.999809\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":7}]},{"cell_type":"code","metadata":{"id":"1ykjRQhCtQ4w","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197515551,"user_tz":-300,"elapsed":1795019,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"9b6314ff-1ff8-4912-8e0c-6d257bde5633"},"source":["fitted_pipe.predict(\"Science has advanced rapidly over the last century \")\n"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[Science has advanced rapidly over the last ce...</td>\n","      <td>0</td>\n","      <td>Science has advanced rapidly over the last cen...</td>\n","      <td>[0.022739632055163383, -0.034671563655138016, ...</td>\n","      <td>Sci/Tech</td>\n","      <td>0.999993</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                            sentence  ...  trained_classifier_confidence_confidence\n","0  [Science has advanced rapidly over the last ce...  ...                                  0.999993\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":8}]},{"cell_type":"markdown","metadata":{"id":"vohym-XbuNHn"},"source":["# The Model understands German\n","![de](https://www.worldometers.info/img/flags/small/tn_gm-flag.gif)"]},{"cell_type":"code","metadata":{"id":"dzaaZrI4tVWc","colab":{"base_uri":"https://localhost:8080/","height":97},"executionInfo":{"status":"ok","timestamp":1620197516557,"user_tz":-300,"elapsed":1795978,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"d848eab5-e763-46c6-8a8a-584960fca3f2"},"source":["# German for: 'Businesses are the best way of making profit'\n","fitted_pipe.predict(\"Unternehmen sind der beste Weg, um Gewinn zu erzielen\")\n"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[Unternehmen sind der beste Weg, um Gewinn zu ...</td>\n","      <td>0</td>\n","      <td>Unternehmen sind der beste Weg, um Gewinn zu e...</td>\n","      <td>[-0.048822492361068726, -0.007162907160818577,...</td>\n","      <td>Business</td>\n","      <td>0.999662</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                            sentence  ...  trained_classifier_confidence_confidence\n","0  [Unternehmen sind der beste Weg, um Gewinn zu ...  ...                                  0.999662\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":9}]},{"cell_type":"code","metadata":{"id":"BbhgTSBGtTtJ","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197517522,"user_tz":-300,"elapsed":1796939,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"d144c6e7-2949-4f82-97c1-713c9d4986cc"},"source":["# German for: 'Science has advanced rapidly over the last century'\n","fitted_pipe.predict(\"Die Wissenschaft hat im letzten Jahrhundert rasante Fortschritte gemacht \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[Die Wissenschaft hat im letzten Jahrhundert r...</td>\n","      <td>0</td>\n","      <td>Die Wissenschaft hat im letzten Jahrhundert ra...</td>\n","      <td>[0.035708051174879074, -0.04514779895544052, -...</td>\n","      <td>Sci/Tech</td>\n","      <td>0.999872</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                            sentence  ...  trained_classifier_confidence_confidence\n","0  [Die Wissenschaft hat im letzten Jahrhundert r...  ...                                  0.999872\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":10}]},{"cell_type":"markdown","metadata":{"id":"a1JbtmWquQwj"},"source":["# The Model understands Chinese\n","![zh](https://www.worldometers.info/img/flags/small/tn_ch-flag.gif)"]},{"cell_type":"code","metadata":{"id":"kYSYqtoRtc-P","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197518854,"user_tz":-300,"elapsed":1798198,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"0ad35189-387e-4a9b-9e3a-c10632d3e491"},"source":["# Chinese for: 'There have been a great increase in businesses over the last decade'\n","fitted_pipe.predict(\"在过去的十年中，业务有了很大的增长 \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[在过去的十年中，业务有了很大的增长]</td>\n","      <td>0</td>\n","      <td>在过去的十年中，业务有了很大的增长</td>\n","      <td>[0.0071435291320085526, -0.0031970362178981304...</td>\n","      <td>Business</td>\n","      <td>0.998403</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["              sentence  ...  trained_classifier_confidence_confidence\n","0  [在过去的十年中，业务有了很大的增长]  ...                                  0.998403\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":11}]},{"cell_type":"code","metadata":{"id":"06v9SD-QtlBU","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197519426,"user_tz":-300,"elapsed":1798767,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"ea98f01b-6d68-47ac-94fd-33bdc3611f7e"},"source":["# Chinese for: 'Science has advanced rapidly over the last century'\n","fitted_pipe.predict(\"在上个世纪，科学发展迅速 \")\n","\t\t"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[在上个世纪，科学发展迅速]</td>\n","      <td>0</td>\n","      <td>在上个世纪，科学发展迅速</td>\n","      <td>[0.018992088735103607, -0.05363348498940468, -...</td>\n","      <td>Sci/Tech</td>\n","      <td>0.999965</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["         sentence  ...  trained_classifier_confidence_confidence\n","0  [在上个世纪，科学发展迅速]  ...                                  0.999965\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":12}]},{"cell_type":"markdown","metadata":{"id":"9h7CvN4uu9Pb"},"source":["# Model understands Afrikaans\n","\n","![af](https://www.worldometers.info/img/flags/small/tn_sf-flag.gif)\n","\n"]},{"cell_type":"code","metadata":{"id":"VMPhbgw9twtf","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197520330,"user_tz":-300,"elapsed":1799668,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"2aee9017-96a9-4343-fa95-a9dc396baa93"},"source":["#  Afrikaans for: 'There have been a great increase in businesses over the last decade'\n","fitted_pipe.predict(\"Daar het die afgelope dekade 'n groot toename in besighede plaasgevind \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[Daar het die afgelope dekade 'n groot toename...</td>\n","      <td>0</td>\n","      <td>Daar het die afgelope dekade 'n groot toename ...</td>\n","      <td>[0.028091425076127052, -0.01651562750339508, -...</td>\n","      <td>Business</td>\n","      <td>0.999667</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                            sentence  ...  trained_classifier_confidence_confidence\n","0  [Daar het die afgelope dekade 'n groot toename...  ...                                  0.999667\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":13}]},{"cell_type":"code","metadata":{"id":"zWgNTIdkumhX","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197521279,"user_tz":-300,"elapsed":1800610,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"52f6d92e-ddfc-40ec-a98b-a1d8bd25f5e2"},"source":["#  Afrikaans for: 'Science has advanced rapidly over the last century'\n","fitted_pipe.predict(\"Die wetenskap het die afgelope eeu vinnig gevorder \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[Die wetenskap het die afgelope eeu vinnig gev...</td>\n","      <td>0</td>\n","      <td>Die wetenskap het die afgelope eeu vinnig gevo...</td>\n","      <td>[0.026470882818102837, -0.04339250922203064, -...</td>\n","      <td>Sci/Tech</td>\n","      <td>0.999957</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                            sentence  ...  trained_classifier_confidence_confidence\n","0  [Die wetenskap het die afgelope eeu vinnig gev...  ...                                  0.999957\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":14}]},{"cell_type":"markdown","metadata":{"id":"rSEPkC-Bwnpg"},"source":["# The model understands Vietnamese\n","![vi](https://www.worldometers.info/img/flags/small/tn_vm-flag.gif)"]},{"cell_type":"code","metadata":{"id":"7ksJosuTOYpE","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197522133,"user_tz":-300,"elapsed":1801460,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"3d7881e4-3a07-4d98-90d2-bcffc2813cd2"},"source":["# Vietnamese for: 'There have been a great increase in businesses over the last decade'\n","fitted_pipe.predict(\"Đã có sự gia tăng đáng kể trong các doanh nghiệp trong thập kỷ qua \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[Đã có sự gia tăng đáng kể trong các doanh ngh...</td>\n","      <td>0</td>\n","      <td>Đã có sự gia tăng đáng kể trong các doanh nghi...</td>\n","      <td>[0.0025938497856259346, -0.03647598996758461, ...</td>\n","      <td>Business</td>\n","      <td>0.990353</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                            sentence  ...  trained_classifier_confidence_confidence\n","0  [Đã có sự gia tăng đáng kể trong các doanh ngh...  ...                                  0.990353\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":15}]},{"cell_type":"code","metadata":{"id":"VfG3UaCTEZB_","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197523269,"user_tz":-300,"elapsed":1802591,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"38e3a860-2b5f-4892-9d1f-7b4fc4db775f"},"source":["# Vietnamese for: 'Science has advanced rapidly over the last century'\n","fitted_pipe.predict(\"Khoa học đã phát triển nhanh chóng trong thế kỷ qua \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[Khoa học đã phát triển nhanh chóng trong thế ...</td>\n","      <td>0</td>\n","      <td>Khoa học đã phát triển nhanh chóng trong thế k...</td>\n","      <td>[0.006926487199962139, -0.05958796292543411, -...</td>\n","      <td>Sci/Tech</td>\n","      <td>0.999156</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                            sentence  ...  trained_classifier_confidence_confidence\n","0  [Khoa học đã phát triển nhanh chóng trong thế ...  ...                                  0.999156\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":16}]},{"cell_type":"markdown","metadata":{"id":"IlkmAaMoxTuy"},"source":["# The model understands Japanese\n","![ja](https://www.worldometers.info/img/flags/small/tn_ja-flag.gif)\n"]},{"cell_type":"code","metadata":{"id":"1IfJu3q8wwUt","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197523837,"user_tz":-300,"elapsed":1803156,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"2e3d3d37-f53a-4ea4-881e-b4006a7576a2"},"source":["# Japanese for: 'Businesses are the best way of making profit'\n","fitted_pipe.predict(\"ビジネスは利益を上げるための最良の方法です\")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[ビジネスは利益を上げるための最良の方法です]</td>\n","      <td>0</td>\n","      <td>ビジネスは利益を上げるための最良の方法です</td>\n","      <td>[-0.029112379997968674, -0.022607864812016487,...</td>\n","      <td>Business</td>\n","      <td>0.999007</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                  sentence  ...  trained_classifier_confidence_confidence\n","0  [ビジネスは利益を上げるための最良の方法です]  ...                                  0.999007\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":17}]},{"cell_type":"code","metadata":{"id":"-RjXWbFIPvIs","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197524793,"user_tz":-300,"elapsed":1804105,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"f53d6d52-e8af-4198-87aa-552b04b19c5d"},"source":["# Japanese for: 'Science has advanced rapidly over the last century'\n","fitted_pipe.predict(\"科学は前世紀にわたって急速に進歩しました \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[科学は前世紀にわたって急速に進歩しました]</td>\n","      <td>0</td>\n","      <td>科学は前世紀にわたって急速に進歩しました</td>\n","      <td>[0.019697299227118492, -0.043922919780015945, ...</td>\n","      <td>Sci/Tech</td>\n","      <td>0.999981</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                 sentence  ...  trained_classifier_confidence_confidence\n","0  [科学は前世紀にわたって急速に進歩しました]  ...                                  0.999981\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":18}]},{"cell_type":"markdown","metadata":{"id":"GITfT7FK0CGv"},"source":["# The model understands Zulu\n","![zu](https://www.worldometers.info/img/flags/small/tn_sf-flag.gif)"]},{"cell_type":"code","metadata":{"id":"ifRhs6e7OcR3","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197525357,"user_tz":-300,"elapsed":1804645,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"638310b0-2976-4ec5-f4c2-1331569e3d4e"},"source":["#  Zulu for: 'There have been a great increase in businesses over the last decade'\n","fitted_pipe.predict(\"Kube nokwanda okukhulu emabhizinisini kule minyaka eyishumi edlule \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[Kube nokwanda okukhulu emabhizinisini kule mi...</td>\n","      <td>0</td>\n","      <td>Kube nokwanda okukhulu emabhizinisini kule min...</td>\n","      <td>[0.011455180123448372, -0.01975909061729908, -...</td>\n","      <td>Business</td>\n","      <td>0.998063</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                            sentence  ...  trained_classifier_confidence_confidence\n","0  [Kube nokwanda okukhulu emabhizinisini kule mi...  ...                                  0.998063\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":19}]},{"cell_type":"code","metadata":{"id":"6uelDwq4xdWv","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197526413,"user_tz":-300,"elapsed":1805695,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"57ec65a4-41e7-4c6c-c126-733915f52c38"},"source":["#  Zulu for: 'Science has advanced rapidly over the last century'\n","fitted_pipe.predict(\"Isayensi ithuthuke ngokushesha ngekhulu leminyaka elidlule \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[Isayensi ithuthuke ngokushesha ngekhulu lemin...</td>\n","      <td>0</td>\n","      <td>Isayensi ithuthuke ngokushesha ngekhulu leminy...</td>\n","      <td>[0.0330704040825367, -0.044426657259464264, -0...</td>\n","      <td>Sci/Tech</td>\n","      <td>0.999993</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                            sentence  ...  trained_classifier_confidence_confidence\n","0  [Isayensi ithuthuke ngokushesha ngekhulu lemin...  ...                                  0.999993\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":20}]},{"cell_type":"markdown","metadata":{"id":"VGVvzl_30a0T"},"source":["# The  Model understands Turkish\n","![tr](https://www.worldometers.info/img/flags/small/tn_tu-flag.gif)"]},{"cell_type":"code","metadata":{"id":"DRNnuEeQz2pd","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197526996,"user_tz":-300,"elapsed":1806273,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"5f77024b-daac-404b-c8e6-86ff343a162b"},"source":["#  Turkish for: 'Businesses are the best way of making profit'\n","fitted_pipe.predict(\"İşletmeler kar elde etmenin en iyi yoludur \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[İşletmeler kar elde etmenin en iyi yoludur]</td>\n","      <td>0</td>\n","      <td>İşletmeler kar elde etmenin en iyi yoludur</td>\n","      <td>[-0.02334517240524292, 0.000546906900126487, -...</td>\n","      <td>World</td>\n","      <td>0.778869</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                       sentence  ...  trained_classifier_confidence_confidence\n","0  [İşletmeler kar elde etmenin en iyi yoludur]  ...                                  0.778869\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":21}]},{"cell_type":"code","metadata":{"id":"aOSsiK6J0jWs","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197528015,"user_tz":-300,"elapsed":1807289,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"351e95ec-5b7b-4d02-d4c4-f69612e5e171"},"source":["#  Turkish for: 'Science has advanced rapidly over the last century'\n","fitted_pipe.predict(\"Bilim, geçen yüzyılda hızla ilerledi \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[Bilim, geçen yüzyılda hızla ilerledi]</td>\n","      <td>0</td>\n","      <td>Bilim, geçen yüzyılda hızla ilerledi</td>\n","      <td>[0.01670285128057003, -0.050043195486068726, -...</td>\n","      <td>Sci/Tech</td>\n","      <td>0.999952</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                 sentence  ...  trained_classifier_confidence_confidence\n","0  [Bilim, geçen yüzyılda hızla ilerledi]  ...                                  0.999952\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":22}]},{"cell_type":"markdown","metadata":{"id":"803qL2gt0vlb"},"source":["#  The Model understands Hebrew\n","![he](https://www.worldometers.info/img/flags/small/tn_sf-flag.gif)"]},{"cell_type":"code","metadata":{"id":"XQ5VCtxw0pc0","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197528577,"user_tz":-300,"elapsed":1807847,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"c4ebb377-dc49-47d3-cf7a-95cbf1f51bdb"},"source":["# Hebrew for: 'There have been a great increase in businesses over the last decade'\n","fitted_pipe.predict(\"חלה עלייה גדולה בעסקים בעשור האחרון \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[חלה עלייה גדולה בעסקים בעשור האחרון]</td>\n","      <td>0</td>\n","      <td>חלה עלייה גדולה בעסקים בעשור האחרון</td>\n","      <td>[0.03062829189002514, -0.02228061482310295, -0...</td>\n","      <td>Business</td>\n","      <td>0.99995</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                sentence  ...  trained_classifier_confidence_confidence\n","0  [חלה עלייה גדולה בעסקים בעשור האחרון]  ...                                   0.99995\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":23}]},{"cell_type":"code","metadata":{"id":"9w2ZHfns05A4","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197529362,"user_tz":-300,"elapsed":1808629,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"44abcf8e-e408-4f40-9406-ede613c24ed6"},"source":["# Hebrew for: 'Science has advanced rapidly over the last century'\n","fitted_pipe.predict(\"המדע התקדם במהירות במהלך המאה האחרונה \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[המדע התקדם במהירות במהלך המאה האחרונה]</td>\n","      <td>0</td>\n","      <td>המדע התקדם במהירות במהלך המאה האחרונה</td>\n","      <td>[-0.0030932666268199682, -0.05540183186531067,...</td>\n","      <td>Sci/Tech</td>\n","      <td>0.999996</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                  sentence  ...  trained_classifier_confidence_confidence\n","0  [המדע התקדם במהירות במהלך המאה האחרונה]  ...                                  0.999996\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":24}]},{"cell_type":"markdown","metadata":{"id":"SDlpd33H1HIX"},"source":["# The Model understands Telugu\n","![te](https://www.worldometers.info/img/flags/small/tn_in-flag.gif)\n"]},{"cell_type":"code","metadata":{"id":"Kc5n1bzv1BJT","colab":{"base_uri":"https://localhost:8080/","height":97},"executionInfo":{"status":"ok","timestamp":1620197530739,"user_tz":-300,"elapsed":1810001,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"156cd14f-54ce-4bca-edb7-63b6ef6bb781"},"source":["# Telugu for: 'There have been a great increase in businesses over the last decade'\n","fitted_pipe.predict(\"గత దశాబ్దంలో వ్యాపారాలలో గొప్ప పెరుగుదల ఉంది \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[గత దశాబ్దంలో వ్యాపారాలలో గొప్ప పెరుగుదల ఉంది]</td>\n","      <td>0</td>\n","      <td>గత దశాబ్దంలో వ్యాపారాలలో గొప్ప పెరుగుదల ఉంది</td>\n","      <td>[0.005267495755106211, -0.022807631641626358, ...</td>\n","      <td>Business</td>\n","      <td>0.999976</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                         sentence  ...  trained_classifier_confidence_confidence\n","0  [గత దశాబ్దంలో వ్యాపారాలలో గొప్ప పెరుగుదల ఉంది]  ...                                  0.999976\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":25}]},{"cell_type":"code","metadata":{"id":"-l-u6vrz1Obe","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197530740,"user_tz":-300,"elapsed":1809994,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"2b33d38c-62df-42d2-b8ce-a1fb09ee0d16"},"source":["# Telugu for: 'Science has advanced rapidly over the last century'\n","fitted_pipe.predict(\"గత శతాబ్దంలో సైన్స్ వేగంగా అభివృద్ధి చెందింది \")\n"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[గత శతాబ్దంలో సైన్స్ వేగంగా అభివృద్ధి చెందింది]</td>\n","      <td>0</td>\n","      <td>గత శతాబ్దంలో సైన్స్ వేగంగా అభివృద్ధి చెందింది</td>\n","      <td>[-0.015292854979634285, -0.03326154127717018, ...</td>\n","      <td>Sci/Tech</td>\n","      <td>0.999914</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                          sentence  ...  trained_classifier_confidence_confidence\n","0  [గత శతాబ్దంలో సైన్స్ వేగంగా అభివృద్ధి చెందింది]  ...                                  0.999914\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":26}]},{"cell_type":"markdown","metadata":{"id":"nziBUe8t1Zwn"},"source":["# Model understands Russian\n","![ru](https://www.worldometers.info/img/flags/small/tn_rs-flag.gif)\n"]},{"cell_type":"code","metadata":{"id":"Ckyjl3YQ1VFn","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197532046,"user_tz":-300,"elapsed":1811291,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"490fc79d-f508-446b-ad11-51e47e604fb4"},"source":["#  Russian for: 'Businesses are the best way of making profit'\n","fitted_pipe.predict(\"Бизнес - лучший способ получения прибыли\")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[Бизнес - лучший способ получения прибыли]</td>\n","      <td>0</td>\n","      <td>Бизнес - лучший способ получения прибыли</td>\n","      <td>[-0.016973992809653282, -0.024397604167461395,...</td>\n","      <td>Business</td>\n","      <td>0.999864</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                     sentence  ...  trained_classifier_confidence_confidence\n","0  [Бизнес - лучший способ получения прибыли]  ...                                  0.999864\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":27}]},{"cell_type":"code","metadata":{"id":"GIdWkfGv1gFz","colab":{"base_uri":"https://localhost:8080/","height":97},"executionInfo":{"status":"ok","timestamp":1620197532616,"user_tz":-300,"elapsed":1811857,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"c028edae-42b5-40d2-dd69-099b202016ec"},"source":["#  Russian for: 'Science has advanced rapidly over the last century'\n","fitted_pipe.predict(\"Наука стремительно развивалась за последнее столетие \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[Наука стремительно развивалась за последнее с...</td>\n","      <td>0</td>\n","      <td>Наука стремительно развивалась за последнее ст...</td>\n","      <td>[0.013989578001201153, -0.0456346794962883, -0...</td>\n","      <td>Sci/Tech</td>\n","      <td>0.999994</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                            sentence  ...  trained_classifier_confidence_confidence\n","0  [Наука стремительно развивалась за последнее с...  ...                                  0.999994\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":28}]},{"cell_type":"markdown","metadata":{"id":"8R1j9mwz2Cm4"},"source":["# Model understands Urdu\n","![ur](https://www.worldometers.info/img/flags/small/tn_pk-flag.gif)"]},{"cell_type":"code","metadata":{"id":"j4zwvRV11pcG","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197533481,"user_tz":-300,"elapsed":1812710,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"335470f5-4a73-4391-ac4d-32668d723ea0"},"source":["# Urdu for: 'There have been a great increase in businesses over the last decade'\n","fitted_pipe.predict(\"پچھلے ایک دہائی کے دوران کاروباروں میں زبردست اضافہ ہوا ہے \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[پچھلے ایک دہائی کے دوران کاروباروں میں زبردست...</td>\n","      <td>0</td>\n","      <td>پچھلے ایک دہائی کے دوران کاروباروں میں زبردست ...</td>\n","      <td>[-0.004565518815070391, -0.008193258196115494,...</td>\n","      <td>Business</td>\n","      <td>0.999983</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                            sentence  ...  trained_classifier_confidence_confidence\n","0  [پچھلے ایک دہائی کے دوران کاروباروں میں زبردست...  ...                                  0.999983\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":29}]},{"cell_type":"code","metadata":{"id":"SxzTuK4b2UKV","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197534080,"user_tz":-300,"elapsed":1813306,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"6ecb7a1c-4c42-415f-a0f0-63e7fece5b8f"},"source":["# Urdu for: 'Science has advanced rapidly over the last century'\n","fitted_pipe.predict(\"سائنس گذشتہ صدی کے دوران تیزی سے ترقی کرچکی ہے \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[سائنس گذشتہ صدی کے دوران تیزی سے ترقی کرچکی ہے]</td>\n","      <td>0</td>\n","      <td>سائنس گذشتہ صدی کے دوران تیزی سے ترقی کرچکی ہے</td>\n","      <td>[-0.013339939527213573, -0.026210565119981766,...</td>\n","      <td>Sci/Tech</td>\n","      <td>0.984679</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                           sentence  ...  trained_classifier_confidence_confidence\n","0  [سائنس گذشتہ صدی کے دوران تیزی سے ترقی کرچکی ہے]  ...                                  0.984679\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":30}]},{"cell_type":"markdown","metadata":{"id":"RoNg-C3k1qcX"},"source":["# Model understands Hindi\n","![hi](https://www.worldometers.info/img/flags/small/tn_in-flag.gif)\n"]},{"cell_type":"code","metadata":{"id":"QZ9RT5Wv1r1n","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197534954,"user_tz":-300,"elapsed":1814173,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"e2b82257-d3dc-4c25-8360-299f76a2c927"},"source":["# hindi for: 'There have been a great increase in businesses over the last decade'\n","fitted_pipe.predict(\"पिछले दशक में व्यवसायों में बहुत वृद्धि हुई है \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[पिछले दशक में व्यवसायों में बहुत वृद्धि हुई है]</td>\n","      <td>0</td>\n","      <td>पिछले दशक में व्यवसायों में बहुत वृद्धि हुई है</td>\n","      <td>[-0.003939628601074219, -0.029372189193964005,...</td>\n","      <td>Business</td>\n","      <td>0.999962</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                           sentence  ...  trained_classifier_confidence_confidence\n","0  [पिछले दशक में व्यवसायों में बहुत वृद्धि हुई है]  ...                                  0.999962\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":31}]},{"cell_type":"code","metadata":{"id":"quM-IL2i12-B","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197536135,"user_tz":-300,"elapsed":1815347,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"4471f6ea-7286-4c7c-b9ce-ba545039c9d4"},"source":["\t\t\n","# hindi for: 'Science has advanced rapidly over the last century'\n","fitted_pipe.predict(\"विज्ञान पिछली सदी में तेजी से आगे बढ़ा है \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[विज्ञान पिछली सदी में तेजी से आगे बढ़ा है]</td>\n","      <td>0</td>\n","      <td>विज्ञान पिछली सदी में तेजी से आगे बढ़ा है</td>\n","      <td>[-0.0006327558076009154, -0.04775548726320267,...</td>\n","      <td>Sci/Tech</td>\n","      <td>0.999993</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                      sentence  ...  trained_classifier_confidence_confidence\n","0  [विज्ञान पिछली सदी में तेजी से आगे बढ़ा है]  ...                                  0.999993\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":32}]},{"cell_type":"markdown","metadata":{"id":"R4ByHOZn35Lc"},"source":["# The model understands Tartar\n","![tt](https://www.worldometers.info/img/flags/small/tn_rs-flag.gif)"]},{"cell_type":"code","metadata":{"id":"2JrzusSQ18F5","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197536699,"user_tz":-300,"elapsed":1815907,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"03b0d1d4-c29d-4015-d0c2-bed8d6ecd862"},"source":["# Tartar for: 'There have been a great increase in businesses over the last decade'\n","fitted_pipe.predict(\"Соңгы ун елда бизнеста зур үсеш булды \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[Соңгы ун елда бизнеста зур үсеш булды]</td>\n","      <td>0</td>\n","      <td>Соңгы ун елда бизнеста зур үсеш булды</td>\n","      <td>[0.023730726912617683, -0.02879853919148445, -...</td>\n","      <td>Business</td>\n","      <td>0.934704</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                  sentence  ...  trained_classifier_confidence_confidence\n","0  [Соңгы ун елда бизнеста зур үсеш булды]  ...                                  0.934704\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":33}]},{"cell_type":"code","metadata":{"id":"J06Xm_Ln4AYu","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197537548,"user_tz":-300,"elapsed":1816753,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"ec4be7d1-e6b2-40a4-8b88-f9d8021277cb"},"source":["# Tartar for: 'Science has advanced rapidly over the last century'\n","fitted_pipe.predict(\"Соңгы гасырда фән тиз үсә \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[Соңгы гасырда фән тиз үсә]</td>\n","      <td>0</td>\n","      <td>Соңгы гасырда фән тиз үсә</td>\n","      <td>[0.021184425801038742, -0.046850692480802536, ...</td>\n","      <td>Sci/Tech</td>\n","      <td>0.999991</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                      sentence  ...  trained_classifier_confidence_confidence\n","0  [Соңгы гасырда фән тиз үсә]  ...                                  0.999991\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":34}]},{"cell_type":"markdown","metadata":{"id":"HKj5yWwwMplH"},"source":["# The Model understands French\n","![fr](https://www.worldometers.info/img/flags/small/tn_fr-flag.gif)"]},{"cell_type":"code","metadata":{"id":"CUHcJZfJMplL","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197538136,"user_tz":-300,"elapsed":1817338,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"6247ab60-e61c-490c-faaf-a44ec7127f3e"},"source":["# French for: 'There have been a great increase in businesses over the last decade'\n","fitted_pipe.predict(\"Il y a eu une forte augmentation des entreprises au cours de la dernière décennie \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[Il y a eu une forte augmentation des entrepri...</td>\n","      <td>0</td>\n","      <td>Il y a eu une forte augmentation des entrepris...</td>\n","      <td>[0.007794354110956192, -0.012789416126906872, ...</td>\n","      <td>Business</td>\n","      <td>0.999989</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                            sentence  ...  trained_classifier_confidence_confidence\n","0  [Il y a eu une forte augmentation des entrepri...  ...                                  0.999989\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":35}]},{"cell_type":"code","metadata":{"id":"57NY2XoTMplM","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197539065,"user_tz":-300,"elapsed":1818260,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"6f131b62-8a18-4757-fe98-e4be5df19a3e"},"source":["# French for: 'Science has advanced rapidly over the last century'\n","fitted_pipe.predict(\"La science a progressé rapidement au cours du siècle dernier \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[La science a progressé rapidement au cours du...</td>\n","      <td>0</td>\n","      <td>La science a progressé rapidement au cours du ...</td>\n","      <td>[0.012393303215503693, -0.04608025774359703, -...</td>\n","      <td>Sci/Tech</td>\n","      <td>0.999996</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                            sentence  ...  trained_classifier_confidence_confidence\n","0  [La science a progressé rapidement au cours du...  ...                                  0.999996\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":36}]},{"cell_type":"markdown","metadata":{"id":"jD2TBgT0Nq6F"},"source":["# The Model understands Thai\n","![th](https://www.worldometers.info/img/flags/small/tn_th-flag.gif)"]},{"cell_type":"code","metadata":{"id":"gBp11S5GNq6S","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197539659,"user_tz":-300,"elapsed":1818850,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"79cee46e-1920-4c15-c14c-cc175f24f8e4"},"source":["\t\t\n","# Thai for: 'There have been a great increase in businesses over the last decade'\n","fitted_pipe.predict(\"มีธุรกิจเพิ่มขึ้นอย่างมากในช่วงทศวรรษที่ผ่านมา \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[มีธุรกิจเพิ่มขึ้นอย่างมากในช่วงทศวรรษที่ผ่านมา]</td>\n","      <td>0</td>\n","      <td>มีธุรกิจเพิ่มขึ้นอย่างมากในช่วงทศวรรษที่ผ่านมา</td>\n","      <td>[0.008413499221205711, -0.024852054193615913, ...</td>\n","      <td>Business</td>\n","      <td>0.991779</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                           sentence  ...  trained_classifier_confidence_confidence\n","0  [มีธุรกิจเพิ่มขึ้นอย่างมากในช่วงทศวรรษที่ผ่านมา]  ...                                  0.991779\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":37}]},{"cell_type":"code","metadata":{"id":"R6nKI7C3QKa3","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197540533,"user_tz":-300,"elapsed":1819712,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"21a225d5-c5a4-46ea-d8f7-17e7c391d173"},"source":["# Thai for: 'Science has advanced rapidly over the last century'\n","fitted_pipe.predict(\"วิทยาศาสตร์ก้าวหน้าอย่างรวดเร็วในช่วงศตวรรษที่ผ่านมา \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[วิทยาศาสตร์ก้าวหน้าอย่างรวดเร็วในช่วงศตวรรษที...</td>\n","      <td>0</td>\n","      <td>วิทยาศาสตร์ก้าวหน้าอย่างรวดเร็วในช่วงศตวรรษที่...</td>\n","      <td>[0.007343569304794073, -0.04965794086456299, -...</td>\n","      <td>Sci/Tech</td>\n","      <td>0.999949</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                            sentence  ...  trained_classifier_confidence_confidence\n","0  [วิทยาศาสตร์ก้าวหน้าอย่างรวดเร็วในช่วงศตวรรษที...  ...                                  0.999949\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":38}]},{"cell_type":"markdown","metadata":{"id":"mLItI4KZOElB"},"source":["# The Model understands Khmer\n","![km](https://www.worldometers.info/img/flags/small/tn_cb-flag.gif)"]},{"cell_type":"code","metadata":{"id":"SWbqMgAwOElC","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197541542,"user_tz":-300,"elapsed":1820712,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"a8376e8f-1d80-43ac-db55-4afe447cdbf5"},"source":["# Khmer for: 'There have been a great increase in businesses over the last decade'\n","fitted_pipe.predict(\"មានការរីកចម្រើនយ៉ាងខ្លាំងនៅក្នុងអាជីវកម្មក្នុងរយៈពេលមួយទសវត្សចុងក្រោយនេះ \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[មានការរីកចម្រើនយ៉ាងខ្លាំងនៅក្នុងអាជីវកម្មក្នុ...</td>\n","      <td>0</td>\n","      <td>មានការរីកចម្រើនយ៉ាងខ្លាំងនៅក្នុងអាជីវកម្មក្នុង...</td>\n","      <td>[0.025004420429468155, -0.037305913865566254, ...</td>\n","      <td>Business</td>\n","      <td>0.967588</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                            sentence  ...  trained_classifier_confidence_confidence\n","0  [មានការរីកចម្រើនយ៉ាងខ្លាំងនៅក្នុងអាជីវកម្មក្នុ...  ...                                  0.967588\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":39}]},{"cell_type":"code","metadata":{"id":"beoCtm4xQf2P","colab":{"base_uri":"https://localhost:8080/","height":97},"executionInfo":{"status":"ok","timestamp":1620197541894,"user_tz":-300,"elapsed":1821049,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"5e03f1bb-e2e2-4df8-d835-7b131a931aa2"},"source":["\t\t\n","# Khmer for: 'Science has advanced rapidly over the last century'\n","fitted_pipe.predict(\"វិទ្យាសាស្ត្របានជឿនលឿនយ៉ាងលឿនក្នុងរយៈពេលមួយសតវត្សចុងក្រោយនេះ \")\n","\t\t"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[វិទ្យាសាស្ត្របានជឿនលឿនយ៉ាងលឿនក្នុងរយៈពេលមួយសត...</td>\n","      <td>0</td>\n","      <td>វិទ្យាសាស្ត្របានជឿនលឿនយ៉ាងលឿនក្នុងរយៈពេលមួយសតវ...</td>\n","      <td>[0.00846723560243845, -0.05188147351145744, -0...</td>\n","      <td>Sci/Tech</td>\n","      <td>0.999939</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                            sentence  ...  trained_classifier_confidence_confidence\n","0  [វិទ្យាសាស្ត្របានជឿនលឿនយ៉ាងលឿនក្នុងរយៈពេលមួយសត...  ...                                  0.999939\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":40}]},{"cell_type":"markdown","metadata":{"id":"lvE-LbNiPoBT"},"source":["# The Model understands Yiddish\n","![yi](https://www.worldometers.info/img/flags/small/tn_pl-flag.gif)"]},{"cell_type":"code","metadata":{"id":"sZlmLhajPoBb","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197542690,"user_tz":-300,"elapsed":1821827,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"d781e4d8-ae66-4e51-b9f8-bd28ee03ec7c"},"source":["\n","# Yiddish for: 'There have been a great increase in businesses over the last decade'\n","fitted_pipe.predict(\"די לעצטע יאָרצענדלינג איז געווען אַ גרויס פאַרגרעסערן אין געשעפטן \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[די לעצטע יאָרצענדלינג איז געווען אַ גרויס פאַ...</td>\n","      <td>0</td>\n","      <td>די לעצטע יאָרצענדלינג איז געווען אַ גרויס פאַר...</td>\n","      <td>[0.0017608355265110731, -0.03173188120126724, ...</td>\n","      <td>Business</td>\n","      <td>0.999986</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                            sentence  ...  trained_classifier_confidence_confidence\n","0  [די לעצטע יאָרצענדלינג איז געווען אַ גרויס פאַ...  ...                                  0.999986\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":41}]},{"cell_type":"code","metadata":{"id":"5h-pha_nPoBc","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197543635,"user_tz":-300,"elapsed":1822744,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"44adf300-29ba-49e9-d279-a402c16622ef"},"source":["# Yiddish for: 'Science has advanced rapidly over the last century'\n","fitted_pipe.predict(\"וויסנשאַפֿט איז ראַפּאַדלי אַוואַנסירטע איבער די לעצטע יאָרהונדערט \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[וויסנשאַפֿט איז ראַפּאַדלי אַוואַנסירטע איבער...</td>\n","      <td>0</td>\n","      <td>וויסנשאַפֿט איז ראַפּאַדלי אַוואַנסירטע איבער ...</td>\n","      <td>[-0.020669342949986458, -0.055476754903793335,...</td>\n","      <td>Sci/Tech</td>\n","      <td>0.99999</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                            sentence  ...  trained_classifier_confidence_confidence\n","0  [וויסנשאַפֿט איז ראַפּאַדלי אַוואַנסירטע איבער...  ...                                   0.99999\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":42}]},{"cell_type":"markdown","metadata":{"id":"XSz4WzScaAHj"},"source":["# The Model understands Kygrgyz\n","![ky](https://www.worldometers.info/img/flags/small/tn_kg-flag.gif)"]},{"cell_type":"code","metadata":{"id":"DXz6fhJSaAHu","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197544172,"user_tz":-300,"elapsed":1823265,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"e04b33fd-e642-4af1-ba93-a4720e47f744"},"source":["# Kygrgyz for: 'Businesses are the best way of making profit'\n","fitted_pipe.predict(\"Бизнес - бул киреше табуунун эң мыкты жолу \")\n","\t\t"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[Бизнес - бул киреше табуунун эң мыкты жолу]</td>\n","      <td>0</td>\n","      <td>Бизнес - бул киреше табуунун эң мыкты жолу</td>\n","      <td>[-0.02840232476592064, -0.02759084478020668, -...</td>\n","      <td>Business</td>\n","      <td>0.99997</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                       sentence  ...  trained_classifier_confidence_confidence\n","0  [Бизнес - бул киреше табуунун эң мыкты жолу]  ...                                   0.99997\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":43}]},{"cell_type":"code","metadata":{"id":"lh_ZSHlPaAHv","colab":{"base_uri":"https://localhost:8080/","height":80},"executionInfo":{"status":"ok","timestamp":1620197544517,"user_tz":-300,"elapsed":1823598,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"bdd76b58-7246-4de0-f7b6-bdeb2dad47bd"},"source":["# Kygrgyz for: 'Science has advanced rapidly over the last century'\n","fitted_pipe.predict(\"Илим акыркы кылымда тездик менен өнүккөн \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[Илим акыркы кылымда тездик менен өнүккөн]</td>\n","      <td>0</td>\n","      <td>Илим акыркы кылымда тездик менен өнүккөн</td>\n","      <td>[0.025420306250452995, -0.044107209891080856, ...</td>\n","      <td>Sci/Tech</td>\n","      <td>0.999989</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                     sentence  ...  trained_classifier_confidence_confidence\n","0  [Илим акыркы кылымда тездик менен өнүккөн]  ...                                  0.999989\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":44}]},{"cell_type":"markdown","metadata":{"id":"DGMVMKaTdJFj"},"source":["# The Model understands Tamil\n","![ta](https://www.worldometers.info/img/flags/small/tn_in-flag.gif)"]},{"cell_type":"code","metadata":{"id":"JWDr_LoCdJFn","colab":{"base_uri":"https://localhost:8080/","height":97},"executionInfo":{"status":"ok","timestamp":1620197545323,"user_tz":-300,"elapsed":1824394,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"daf468d4-1e74-427a-918c-d526a0570e1e"},"source":["# Tamil for: 'There have been a great increase in businesses over the last decade'\n","fitted_pipe.predict(\"கடந்த தசாப்தத்தில் வணிகங்களில் பெரும் அதிகரிப்பு ஏற்பட்டுள்ளது \")"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[கடந்த தசாப்தத்தில் வணிகங்களில் பெரும் அதிகரிப...</td>\n","      <td>0</td>\n","      <td>கடந்த தசாப்தத்தில் வணிகங்களில் பெரும் அதிகரிப்...</td>\n","      <td>[0.00573153980076313, -0.03077314794063568, -0...</td>\n","      <td>Business</td>\n","      <td>0.99997</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                            sentence  ...  trained_classifier_confidence_confidence\n","0  [கடந்த தசாப்தத்தில் வணிகங்களில் பெரும் அதிகரிப...  ...                                   0.99997\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":45}]},{"cell_type":"code","metadata":{"id":"Q6C0BmTtdJFp","colab":{"base_uri":"https://localhost:8080/","height":97},"executionInfo":{"status":"ok","timestamp":1620197546099,"user_tz":-300,"elapsed":1825152,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"cf5ca785-5493-448a-d6f3-39b425ad95ff"},"source":["\t\t\n","# Tamil for: 'Science has advanced rapidly over the last century'\n","fitted_pipe.predict(\"கடந்த நூற்றாண்டில் அறிவியல் வேகமாக முன்னேறியுள்ளது \")\n","\t\t"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>sentence</th>\n","      <th>origin_index</th>\n","      <th>document</th>\n","      <th>sentence_embedding_labse</th>\n","      <th>trained_classifier</th>\n","      <th>trained_classifier_confidence_confidence</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[கடந்த நூற்றாண்டில் அறிவியல் வேகமாக முன்னேறியு...</td>\n","      <td>0</td>\n","      <td>கடந்த நூற்றாண்டில் அறிவியல் வேகமாக முன்னேறியுள...</td>\n","      <td>[0.00972939282655716, -0.04586024209856987, -0...</td>\n","      <td>Sci/Tech</td>\n","      <td>0.999998</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["                                            sentence  ...  trained_classifier_confidence_confidence\n","0  [கடந்த நூற்றாண்டில் அறிவியல் வேகமாக முன்னேறியு...  ...                                  0.999998\n","\n","[1 rows x 6 columns]"]},"metadata":{"tags":[]},"execution_count":46}]},{"cell_type":"markdown","metadata":{"id":"2BB-NwZUoHSe"},"source":["# 5. Lets save the model"]},{"cell_type":"code","metadata":{"id":"eLex095goHwm","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1620198319579,"user_tz":-300,"elapsed":2598620,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"69c875c5-a49b-456e-e11d-fe897b214ab0"},"source":["stored_model_path = './models/classifier_dl_trained' \n","fitted_pipe.save(stored_model_path)"],"execution_count":null,"outputs":[{"output_type":"stream","text":["Stored model in ./models/classifier_dl_trained\n"],"name":"stdout"}]},{"cell_type":"markdown","metadata":{"id":"e_b2DPd4rCiU"},"source":["# 6. Lets load the model from HDD.\n","This makes Offlien NLU usage possible!   \n","You need to call nlu.load(path=path_to_the_pipe) to load a model/pipeline from disk."]},{"cell_type":"code","metadata":{"id":"SO4uz45MoRgp","colab":{"base_uri":"https://localhost:8080/","height":97},"executionInfo":{"status":"ok","timestamp":1620198578228,"user_tz":-300,"elapsed":137070,"user":{"displayName":"Gammer Otaku","photoUrl":"","userId":"18042713576744284398"}},"outputId":"d356f0ea-880f-4dd6-e8a7-2cb80cc356ff"},"source":["stored_model_path = './models/classifier_dl_trained'\n","hdd_pipe = nlu.load(path=stored_model_path)\n","\n","preds = hdd_pipe.predict('Tesla plans to invest 10M into the ML sector')\n","preds"],"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/html":["<div>\n","<style scoped>\n","    .dataframe tbody tr th:only-of-type {\n","        vertical-align: middle;\n","    }\n","\n","    .dataframe tbody tr th {\n","        vertical-align: top;\n","    }\n","\n","    .dataframe thead th {\n","        text-align: right;\n","    }\n","</style>\n","<table border=\"1\" class=\"dataframe\">\n","  <thead>\n","    <tr style=\"text-align: right;\">\n","      <th></th>\n","      <th>from_disk</th>\n","      <th>origin_index</th>\n","      <th>sentence_embedding_from_disk</th>\n","      <th>document</th>\n","      <th>from_disk_confidence_confidence</th>\n","      <th>sentence</th>\n","      <th>text</th>\n","    </tr>\n","  </thead>\n","  <tbody>\n","    <tr>\n","      <th>0</th>\n","      <td>[Business]</td>\n","      <td>8589934592</td>\n","      <td>[[0.02070710062980652, -0.031539998948574066, ...</td>\n","      <td>Tesla plans to invest 10M into the ML sector</td>\n","      <td>[0.93137294]</td>\n","      <td>[Tesla plans to invest 10M into the ML sector]</td>\n","      <td>Tesla plans to invest 10M into the ML sector</td>\n","    </tr>\n","  </tbody>\n","</table>\n","</div>"],"text/plain":["    from_disk  ...                                          text\n","0  [Business]  ...  Tesla plans to invest 10M into the ML sector\n","\n","[1 rows x 7 columns]"]},"metadata":{"tags":[]},"execution_count":1}]},{"cell_type":"code","metadata":{"id":"e0CVlkk9v6Qi"},"source":["hdd_pipe.print_info()"],"execution_count":null,"outputs":[]}]}